package com.jiazhong.basic.pack0518.db;

import lombok.SneakyThrows;

import java.sql.Connection;
import java.sql.DriverManager;

public class DBManager {
    @SneakyThrows
    public static Connection getConnection() {
        Class.forName("com.mysql.cj.jdbc.Driver");
        String url = "jdbc:mysql:///jiazhong_2025_2";
        String user = "root";
        String password = "a123456";
        Connection conn = DriverManager.getConnection(url, user, password);
        return conn;
    }
}
